package com.headcaselabs.utils;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class RunLinuxCommand
{
    
   
    public String execute(String cmd) throws IOException
    {
    	String line;
    	StringBuffer output = new StringBuffer();
      Process p = Runtime.getRuntime().exec(cmd);
      BufferedReader input =
        new BufferedReader
          (new InputStreamReader(p.getInputStream()));
      while ((line = input.readLine()) != null) {
        output.append(line);
      }
      input.close();
      return output.toString();

    }
    
   
}


